<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./../template/WorkspaceTemplate.xhtml">

    <ui:define name="top">

    </ui:define>

    <ui:define name="left">

    </ui:define>

    <ui:define name="right">

    </ui:define>

    <ui:define name="content">

        <h2>View Goods Receipt Rating</h2>
        <h:form id="rateGoodsReceiptForm" style="font-size: 85%">
            <br/>
            <p:panel>
                <p:messages/>

                <h:panelGrid columns="6" cellpadding="10">

                    <h:outputLabel style="font-weight: bold" value="Supplier Id: "/>
                    <h:outputText value="#{rsManagerBean.goodsReceipt.supplier.supplierId}"/>
                    <h:outputText value=""/>
                    <h:outputText value=""/>
                    <h:outputLabel style="font-weight: bold" value="Goods Receipt Id: "/>
                    <h:outputText value="#{rsManagerBean.goodsReceipt.goodsReceiptId}"/>


                    <h:outputLabel style="font-weight: bold" value="Supplier Name: "/>
                    <h:outputText value="#{rsManagerBean.goodsReceipt.supplier.supplierName}"/>

                </h:panelGrid>

                <br/>
                <br/>
                <br/>
                <h:outputText value="Invoice Ratings" style="font-weight: bold; font-size: 110%"/>
                <p:separator/>
                <br/>
                <p:dataTable var="rec" value="#{rsManagerBean.goodsReceipt.rating.ratings}" style="width: 50%; margin-left: auto; margin-right: auto">

                    <p:column headerText="Criteria" style="text-align: center; width: 60%">
                        <h:outputLabel style="font-weight: bold" value="#{rec.criterion}"/>
                    </p:column>

                    <p:column headerText="Ratings (1 - 5)" style="text-align: center; width: 5px">
                        <h:outputText value="#{rec.rating}"/>
                    </p:column>

                </p:dataTable>
                <br/>
            </p:panel>
            <br/>
            <br/>
            <div align="right">
                <p:commandButton image="ui-icon ui-icon-arrowreturnthick-1-w" value="Back" action="#{rsManagerBean.back()}"/>
            </div>
            <br/>
            <br/>
        </h:form>

    </ui:define>

    <ui:define name="bottom">

    </ui:define>

</ui:composition>